Gr
oup Lasso
2018
–
2
라밑데
스터디
HyejuKim.ybigta
C
oncept
s
HyejuKim.ybigta
Lasso :
우리가
알고
있는
변수
선택법
•
쉽게
말해
쓸모
없는
변수의
계수를
0
으로
만들어
없애
버림
HyejuKim.ybigta
•
라쏘
..
기초
개념은
매번
발제되는
내용이라
무엇을
이야기할지
..
HyejuKim.ybigta
•
공모전에서
갓진원님이
알려주셨던
그룹라쏘에
대해
조금
더
공부해보
기로
했다
HyejuKim.ybigta
그림으로
먼저
https://turbosnu.wor
dpress.com/201
6/01/20/note-down-
f
eatur
e-
selection-f
or-adc/
HyejuKim.ybigta
Gr
oup Lasso
: submatrix of X with columns corr
esponding to the
predictor
s in group
^(
: the coef
ficient
vector
of that gr
oup
: the length of
if it includes a gr
oup in the model then
all coefficien
ts
in the gr
oup will be nonzer
o
•
패널티항에
‘
그룹의
계수
’
벡터가
들어가므로
,
이번엔
쓸모
없는
그룹은
다
날리고
쓸모
있는
그룹이면
그룹의
모든
계수가
살아남음
HyejuKim.ybigta
Gr
oup Lasso
:
라쏘와
릿지
그
사이
Lasso :
Gr
oup Lasso:
Ridge :
Spar
sity
Spar
sity at factor
level
Non sp
arsity
L1
norm
은
spar
sity
가능하도록
만들어주고
,
L2 norm
은
그룹
내
계수
전체를
nonzer
o
로
만들어
줌
HyejuKim.ybigta
1.
그룹
별
특성이
있을
경우
2. categor
ical variable
그룹
라쏘의
의미
…?
HyejuKim.ybigta
참고
: Sp
arse-gr
oup Lasso
2 types of sp
arsity:
1) gr
ou
pwise sparsity : the numb
er of gr
oups with at least one
nonzer
o coefficient
2) within gr
oup spar
sity: the number of nonz
ero
coefficients
within
each nonz
ero
gr
oup
어떤
sparsity
에
집중
?
전반적인
sparsity
HyejuKim.ybigta
Implemen
tation
HyejuKim.ybigta
How t
o implement
1.
Python
–
pyglmnet (elasticnet, gr
oup)
2.
R
–
ggl
ass
o
,
grplasso(gr
oup
lasso)
- SGL(sp
ar
e
gr
oup
lasso)
HyejuKim.ybigta
How t
o implement
1.
Python
–
pyglmnet (elasticnet, gr
oup)
-
Cv
기능이
오류남
-
Lambda
찾아주는
함수
없음
-
Dataset
마저
오류남
HyejuKim.ybigta
How t
o implement
2. R
–
ggl
asso
,
grplasso(gr
oup
lasso)
- SGL(sp
ar
e gr
oup lasso)
선택한
pac
kage : ggl
ass
o
-
c
v
함수
존재
-
cv
err
o
r
최소
Lambd
a
찾아줌
HyejuKim.ybigta
1.
그룹화된
변수
•
Dataset : gglasso
에
있던
bio dataset
bar
d
et
https://cr
an.r-project.or
g/web/packages/gglasso/gglasso.pdf
x
: a [120 x 100] mat
rix (expanded fr
om
a [120 x 20] matrix) giving
the expr
ession lev
els of 20
filter
ed genes f
or the 120 samples. Each r
ow corr
esponds to a subject,
each 5 consecutive
columns to
a gr
ouped gene.
y
:
a numeric vector
of length 120 giving expr
ession level of gene T
RIM32,
which causes Bar
det
-
Biedl syndr
ome.
HyejuKim.ybigta
gglasso
c
v
.gglasso(x, y
, group, lamb
da = NULL,
pr
ed.loss
= c("misclass
", "loss", "L1", "L2"),
nf
olds = 5, f
oldid, delta, ...)
HyejuKim.ybigta
HyejuKim.ybigta
결과
비교
HyejuKim.ybigta
2. Cat
egorical v
ariable
•
Dataset : Kaggle bik
e
sharing demand
일부
HyejuKim.ybigta
2. Cat
egorical v
ariable
•
Dataset : Kaggle bik
e
sharing demand
일부
HyejuKim.ybigta
2. Cat
egorical v
ariable
•
Dataset : Kaggle bik
e
sharing demand
일부
HyejuKim.ybigta
계수
비교
–
Multiple LR
HyejuKim.ybigta
계수
비교
–
Lasso vs Gr
oup Lasso
HyejuKim.ybigta
결과
비교
HyejuKim.ybigta
결론
•
생각보다
별로
dramatic
한
scor
e
차이는
없었다
•
scor
e
의
변화보다는
의미의
측면에서
유용하지
않을까
•
혹은
categor
ical varia
ble
의
개수와
차원이
더
높은
경우에서
유용하
지
않을까
HyejuKim.ybigta
참고문헌
•
https://cr
an.r-pr
oject.or
g/web/packages/gglasso/gglasso.
pdf
•
NO
AH SIMON,
A SP
ARSE
-GROUP LASSO
•
Y
uan and Lin, Model selection and estimation in r
egr
ession
with
•
gr
ouped
v
ariables
HyejuKim.ybigta